package online.liulei.design.mode.main;

import online.liulei.design.mode.Duck;
import online.liulei.design.mode.FlyWithRocketPowered;
import online.liulei.design.mode.MallardDuck;
import online.liulei.design.mode.ModelDuck;

public class Main {

    public static void main(String[] args) {
        Duck mallardDuck = new MallardDuck();
        mallardDuck.performFly();
        mallardDuck.performQuack();

        System.out.println("......................");

        Duck modelDuck = new ModelDuck();
        modelDuck.performFly();
        modelDuck.performQuack();

        System.out.println("......................");
        modelDuck.setFlyBehavior(new FlyWithRocketPowered());
        modelDuck.performFly();
    }

}
